var http = require('http');
var querystring = require('querystring');
var app = require('./app');

app.init();
http.createServer(function (request, response) {

    var post = ''; 
    request.on('data', function(chunk){    
        post += chunk;
    });

    request.on('end', function(){    
        post = querystring.parse(post);
        if (post.requestType && post.requestName) {
            //如果请求创建角色

            //如果请求冒险等

            // ...

        }
        response.end("success");
    });

}).listen(8888);

// 终端打印如下信息
console.log('Server running at http://127.0.0.1:8888/');